QT       += core gui opengl
greaterThan(QT_MAJOR_VERSION, 4): QT += widgets
RC_FILE += 	$$PWD\icon.rc
CONFIG += c++14
CONFIG += debug_and_release

# QTITANDIR路径
QTITANDIR = D:\Qtitan for vs2019
#Matlab路径
MATLABDIR = E:\Program Files\MATLAB\R2022a\extern

include($$QTITANDIR\src\shared\qtitanstyle.pri)
include($$QTITANDIR\src\shared\qtitanfastinfoset.pri)
include($$QTITANDIR\src\shared\qtitanribbon.pri)

#Osg库的路径
OSGDIR = $$PWD\third_part\osg

#PCL库的路径
PCLDIR = $$PWD\third_part\PCL

#GCAL库的路径
GCALDIR = $$PWD\third_part\CGAL-4.14.3

#BOOST库的路径
BOOSTDIR = $$PWD\third_part\Boost\boost_1_68_0

#OPENCV库的路径
OPENCVDIR = $$PWD\third_part\opencv

#FORM文件的路径
FORMDIR = $$PWD\WidgetUi

#GEOLIB的路径
GEOLIBDIR = $$PWD\third_part\geomlib

#LIBIGLLIB的路径
LIBIGLDIR = $$PWD\third_part\libigl

#NLOPT的路径
NLOPTDIR = $$PWD\third_part\nlopt-2.7.1\bin

#FCL的路径
FCLDIR = $$PWD\third_part\FCL

#libccd的路径
LIBCCDDIR = $$PWD\third_part\libccd

#添加UI
FORMS += $$files($$FORMDIR\*.ui)
UI_DIR = $$PWD\WidgetUi
#添加头文件
HEADERS += \
			$$PWD\*.h\
			$$PWD\FEA_2D\*.h\
			$$PWD\FEA_3D\*.h\
			$$PWD\GraFillPath\*.h\
			$$PWD\OffsetPath\*.h\
			$$PWD\RefSurfSlice\*.h\
			$$PWD\RobotSimu\*.h\
			$$PWD\TopoOptimize_2D\*.h\
			$$PWD\TopoOptimize_3D\*.h\
			$$PWD\VecFieldPath\*.h\
			$$PWD\VecSurfSlice\*.h\
			$$PWD\OSGDrawInterface\*.h\
			$$PWD\SinFiberPlacement\*.h\
			$$PWD\RotaryPlacement\*.h\
			
#添加原文加
SOURCES += \
			$$PWD\*.cpp\
			$$PWD\FEA_2D\*.cpp\
			$$PWD\FEA_3D\*.cpp\
			$$PWD\GraFillPath\*.cpp\
			$$PWD\OffsetPath\*.cpp\
			$$PWD\RefSurfSlice\*.cpp\
			$$PWD\RobotSimu\*.cpp\
			$$PWD\TopoOptimize_2D\*.cpp\
			$$PWD\TopoOptimize_3D\*.cpp\
			$$PWD\VecFieldPath\*.cpp\
			$$PWD\VecSurfSlice\*.cpp\
			$$PWD\OSGDrawInterface\*.cpp\
			$$PWD\SinFiberPlacement\*.cpp\
			$$PWD\RotaryPlacement\*.cpp\

			
#添加包含目录
INCLUDEPATH += $$PWD\third_part\osg\OpenSceneGraph-3.6.5-VC2019-64-Debug\include
INCLUDEPATH += $$PWD\third_part\libigl\include
INCLUDEPATH += $$PWD\third_part\libigl\external\tetgen
INCLUDEPATH += $$PWD\third_part\eigen3
INCLUDEPATH += $$PWD\third_part\PCL\include
INCLUDEPATH += $$PWD\third_part\opencv\build\include
INCLUDEPATH += $$PWD\third_part\opencv\sources\include
INCLUDEPATH += $$PWD\third_part\CGAL-4.14.3\include
INCLUDEPATH += $$PWD\third_part\CGAL-4.14.3\auxiliary\gmp\include
INCLUDEPATH += $$PWD\third_part\CGAL-4.14.3\build\include\CGAL
INCLUDEPATH += $$PWD\third_part\nlopt-2.7.1\bin
INCLUDEPATH += $$PWD\third_part\Boost\boost_1_68_0
INCLUDEPATH += "$$MATLABDIR\include"
INCLUDEPATH += $$PWD\third_part\FCL\include
INCLUDEPATH += $$PWD\third_part\libccd\include

#添加库目录
CONFIG(debug,debug|release){
	LIBS += -L$$OSGDIR/OpenSceneGraph-3.6.5-VC2019-64-Debug/lib \ 
		-losgd \
		-losgDBd \
		-losgGAd \
		-losgQt5d \
		-losgViewerd \
		-losgUtild\
		-losgManipulatord\
		-losgFXd

	LIBS += -L$$PCLDIR/lib \
		-lpcl_kdtreed

	LIBS += -L$$GCALDIR/auxiliary/gmp/lib \
		-llibgmp-10\
        -llibmpfr-4\

	LIBS += -L$$GCALDIR/build/lib \
		-lCGAL_Core-vc141-mt-4.14.3\
        -lCGAL_Core-vc141-mt-gd-4.14.3\
        -lCGAL_ImageIO-vc141-mt-4.14.3\
        -lCGAL_ImageIO-vc141-mt-gd-4.14.3\
        -lCGAL-vc141-mt-4.14.3\
        -lCGAL-vc141-mt-gd-4.14.3\

	LIBS += -L$$LIBIGLDIR/lib/Debug \
			-ltetgen\

	LIBS += -L$$OPENCVDIR/build/x64/vc15/lib \
		-lopencv_world460d\

	LIBS += -L$$GEOLIBDIR/Debug \
		-lGEOLIB_D\

	LIBS += "-L$$MATLABDIR/lib/win64/microsoft" \
		-llibeng\
		-llibmx\
		-llibmat\

	LIBS += -L$$NLOPTDIR/Debug \
		-lnlopt\
		
	LIBS += -L$$BOOSTDIR/lib64-msvc-14.1 \
	
	LIBS += -L$$FCLDIR/lib \
	     -lfcld
	
	LIBS += -L$$LIBCCDDIR/lib \
	     -lccdd
	
	DESTDIR = $$quote($$PWD\build\Debug)
}else{
	LIBS += -L$$OSGDIR/OpenSceneGraph-3.6.5-VC2019-64-Release/lib \ 
		-lOpenThreads \
		-losg \
		-losgDB \
		-losgGA \
		-losgQt5 \
		-losgViewer \
		-losgUtil \
		-losgManipulator \
		-losgFX \


	LIBS += -L$$PCLDIR/lib \
		-lpcl_kdtree

	LIBS += -L$$GCALDIR/auxiliary/gmp/lib \
		-llibgmp-10\
        -llibmpfr-4\

	LIBS += -L$$GCALDIR/build/lib \
		-lCGAL_Core-vc141-mt-4.14.3\
        -lCGAL_ImageIO-vc141-mt-4.14.3\
        -lCGAL-vc141-mt-4.14.3\

	LIBS += -L$$LIBIGLDIR/lib/Release \
			-ltetgen\

	LIBS += -L$$OPENCVDIR/build/x64/vc15/lib \
		-lopencv_world460\

	LIBS += -L$$GEOLIBDIR/Release \
		-lGEOLIB_R\

	LIBS += "-L$$MATLABDIR/lib/win64/microsoft" \
		-llibeng\
		-llibmx\
		-llibmat\

	LIBS += -L$$NLOPTDIR/Release \
		-lnlopt\
		
	LIBS += -L$$BOOSTDIR/lib64-msvc-14.1 \
	
	LIBS += -L$$FCLDIR/lib \
	     -lfcl
	
	LIBS += -L$$LIBCCDDIR/lib \
	     -lccd
	
	DESTDIR = $$quote($$PWD\build\Release)
}






#RESOURCES += res.qrc

include($$PWD/third_part/ribbon/aboutdialog/aboutdialog.pri)
include($$PWD/third_part/ribbon/DemoRibbonWindow/DemoRibbonWindow.pri)

# Default rules for deployment.
qnx: target.path = /tmp/$${TARGET}/bin
else: unix:!android: target.path = /opt/$${TARGET}/bin
!isEmpty(target.path): INSTALLS += target
